//
//  RecordPageController.m
//  Lead
//
//  Created by shouhan on 2018/8/31.
//  Copyright © 2018年 陈永发. All rights reserved.
//

#import "RecordPageController.h"
#import "PayRecordController.h"
#import "PreRecordController.h"
#import "ZWMSegmentController.h"

@interface RecordPageController ()

@property (nonatomic, strong) ZWMSegmentController *segmentVC;

@property (nonatomic, strong) PayRecordController * payVC; // 支付记录VC

@property (nonatomic, strong) PreRecordController * preVC; // 提现记录VC


@end

@implementation RecordPageController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title = @"记录";
    
    self.payVC = [[PayRecordController alloc] init];
    self.preVC = [[PreRecordController alloc] init];

    NSArray *array = @[self.payVC,self.preVC];
    
    self.segmentVC = [[ZWMSegmentController alloc] initWithFrame:self.view.bounds titles:@[@"支付分润记录",@"提现记录"]];
    self.segmentVC.segmentView.showSeparateLine = YES;
    self.segmentVC.segmentView.backgroundColor = [UIColor colorWithHexString:@"#313646"];
    self.segmentVC.segmentView.segmentTintColor = [UIColor colorWithHexString:@"#FEC873"];
    self.segmentVC.segmentView.segmentNormalColor = [UIColor whiteColor];
    self.segmentVC.viewControllers = [array copy];
    if (array.count==1) {
        self.segmentVC.segmentView.style=ZWMSegmentStyleDefault;
    } else {
        self.segmentVC.segmentView.style=ZWMSegmentStyleFlush;
    }
    [self addSegmentController:self.segmentVC];
    [self.segmentVC setSelectedAtIndex:0];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
